<%--
  Created by IntelliJ IDEA.
  User: 73786
  Date: 2021/4/18
  Time: 10:52
  To change this template use File | Settings | File Templates.
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>作业管理</title>
    <link href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">


</head>
<body>
<div class="container">
    <div class="row clearfix">
        <div class="row">
            <div class="col-md-4 column">
<%--                <a class="btn btn-primary" href="${pageContext.request.contextPath}/homework/toAddHomework">提交作业</a>--%>
                <a class="btn btn-primary" href="${pageContext.request.contextPath}/homework/allHomeworks?sname=${student.sname}">显示全部已作业</a>
            </div>
<%--            <div class="col-md-6 column">--%>
<%--                <form class="form-inline" action="" method="post" style="float: right">--%>
<%--                    <input type="text" name="" class="form-control" placeholder="请输入要查询的作业名称" />--%>
<%--                    <input type="submit" value="查询" class="btn btn-primary" />--%>
<%--                </form>--%>
<%--            </div>--%>
        </div>
    </div>

    <div class="row clearfix">
        <div class="col-md-12 column">
            <table class="table table-hover table-striped">
                <thead>
                <tr>
                    <th>作业id</th>
                    <th>课程名</th>
                    <th>答案</th>
                    <th>提交时间</th>
                    <th>姓名</th>
                    <th>作业任务id</th>
                    <th>评语</th>
                    <th>成绩</th>
                    <th>操作</th>
                </tr>
                </thead>
                <!--                foreach-->
                <tbody>
                <c:forEach var="homework" items="${homeworkList}">
                    <tr>
                        <td>${homework.homework_id}</td>
                        <td>${homework.cname}</td>
                        <td>${homework.text_content}</td>
                        <td><input type="text" readonly value="${homework.sub_time}"/></td>
                        <td>${homework.sname}</td>
                        <td>${homework.task_id}</td>
                        <td>${homework.howtodo}</td>
                        <td>${homework.scope}</td>
                        <td>
<%--                            <a href="${pageContext.request.contextPath}/homework/toUpdateHomework?homework_id=${homework.homework_id}">修改</a>--%>
                            &nbsp; | &nbsp;
                            <a href="${pageContext.request.contextPath}/homework/deleteHomeworks?homework_id=${homework.homework_id}&sname=${student.sname}">删除</a>
                        </td>
                    </tr>
                </c:forEach>
                </tbody>
            </table>
        </div>
    </div>

</div>

</body>
</html>
